1. Field of the Invention
The present invention relates to a buffer control device, and specifically to a buffer control device configured to control a buffer that stores encoded data, a processing method for the same, and a program that causes a computer to execute the method.
2. Description of the Related Art
As the size of contents data increases, a technology for encoding data has been widely used to compress and encrypt the data. For example, as a standard for compressing data such as video data and audio data, encoding data in Moving Picture Experts Group 2 (MPEG-2) format has been developed. Specifically, for example, a recording medium such as a digital versatile disc (DVD) stores a program stream (PS) multiplexed with video and audio data encoded in the MPEG-2 format. As for digital broadcasting, for example, video and audio data encoded in the MPEG-2 format are multiplexed in units of packet, and a successive stream of the packets (transport stream (TS)) is transmitted.
A reproduction device that reproduces the video and audio data included in the stream demultiplexes the encoded video and audio data in the stream individually at first. The reproduction device then decodes each piece of the demultiplexed video and audio data and reproduces the data. At the time of decoding and reproducing, the reproduction device temporarily stores the encoded video and audio data in a buffer. When time clocked by the reproduction device becomes equal to a decoding time or a reproducing time of the video and audio data, the reproduction device reads the encoded video and audio data from the buffer and decodes or reproduces the data. In this manner, the reproduction device outputs the video data and the audio data in synchronization with each other.
If, for example, a user inputs an instruction to switch an audio output (for example, from Japanese language to English language) to the reproduction device, the reproduction device discards an encoded audio signal stored in the buffer and stores an audio signal specified by the instruction in the buffer. The buffer stores more than a predetermined amount of audio signals to prevent an underflow, and there can be a silent period during which the more than the predetermined amount of audio signals discarded in response to the instruction to switch the audio output are not reproduced. It is also disadvantageous that, when a low bit rate codec is used, the silent period is longer than the case of using a high bit rate codec, even if the same amount of the audio signals are discarded.
In order to prevent such a silent period that may be caused when the audio output is switched, there is a proposed television receiver that stores audio signals in a buffer. For example, the proposed television receiver stores audio signals that are not reproduced in a buffer, and outputs the audio signals stored in the buffer upon instruction to switch the audio output so as not to cause the silent period (see Japanese Unexamined Patent Application Publication No. 2006-41839 (FIG. 1)).